<div class="block block-mode-loading-oneui">
    <div class="block-header border-bottom">
        <h3 class="block-title">最新文章</h3>
        <div class="block-options">
            <div class="dropdown">
                <button type="button" class="btn-block-option dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">文章管理</button>
                <div class="dropdown-menu dropdown-menu-right font-size-sm" x-placement="bottom-end" style="position: absolute; will-change: transform; top: 0px; left: 0px; transform: translate3d(83px, 28px, 0px);">
                    <?php
                    $article = Menu::getAccessData('article');
                    if ($article) foreach ($article as $node) {
                        if ($node['caption'] == '-') {
                            continue;
                        }
                        $url = Menu::url($node);
                        Menu::nodeArray($node);
                    ?>
                        <a class="dropdown-item" href="<?php echo $url; ?>">
                            <i class="<?php echo $node['icon'] ?> mr-1"></i>
                            <?php echo $node['caption']; ?>
                        </a>
                    <?php } ?>
                </div>
            </div>
        </div>
    </div>
    <div class="block-content p-0">
        <table class="table table-striped table-hover table-borderless table-vcenter font-size-sm mb-0">
            <thead class="thead-dark">
                <tr class="text-uppercase">
                    <th class="font-w700" style="width: 60px;">ID</th>
                    <th class="d-none d-sm-table-cell font-w700 text-center" style="width: 80px;">栏目</th>
                    <th class="font-w700">标题</th>
                    <th class="d-none d-sm-table-cell font-w700 text-center" style="width: 120px;">时间</th>
                    <th class="d-none d-sm-table-cell font-w700 text-center" style="width: 80px;">点击</th>
                    <th class="font-w700 text-center" style="width: 60px;"></th>
                </tr>
            </thead>
            <?php $article_list = articleFunc::article_list(array("row" => 10)); ?>
            <tbody>
                <?php foreach ($article_list as $key => $art) { ?>
                    <tr>
                        <td>
                            <span class="font-w600"><?php echo $art['id']; ?></span>
                        </td>
                        <td class="d-none d-sm-table-cell text-center">
                            <?php echo $art['node']['name']; ?>
                        </td>
                        <td>
                            <a href="<?php echo $art['url']; ?>" target="_blank" data-toggle="tooltip" data-placement="top" title="<?php echo $art['title']; ?>">
                                <?php echo iString::cut($art['title'], 12, '...'); ?>
                            </a>
                        </td>
                        <td class="d-none d-sm-table-cell text-center">
                            <?php echo date("m/d H:i", $art['pubdate']); ?>
                        </td>
                        <td class="d-none d-sm-table-cell text-center">
                            <?php echo $art['hits']['count']; ?>
                        </td>
                        <td class="text-right">
                            <a href="<?php echo ADMINCP_URL; ?>=article&do=edit&id=<?php echo $art['id']; ?>" target="_blank" data-toggle="tooltip" data-placement="left" title="编辑">
                                <i class="fa fa-fw fa-pencil-alt"></i>
                            </a>
                        </td>
                    </tr>
                <?php } ?>
            </tbody>
        </table>
    </div>
</div>